﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NextCore
{
    public class NextLog
    {
        public List<Log> Logs = new List<Log>();
        public void Log(LogType type,string msg,string owner,object cls,DateTime time)
        {
            Log l = new Log();
            l.Type = type;
            l.Msg = msg;
            l.Owner = owner;
            l.Class = cls;
            l.Time = time;
            Logs.Add(l);
        }
        public void ToConsole()
        {
            foreach (var l in Logs)
            {
                Console.WriteLine("Log. Time:" + l.Time.ToString()+" --- Owner:"+l.Owner+" Class:"+ l.Class == null ?  l.Class.ToString() : "" +" --- Type:"+l.Type.ToString());
                Console.WriteLine("--[ "+l.Msg+" ]--");
                Console.WriteLine("---");
                Console.WriteLine("");
                Console.WriteLine("");
            }
        }
    }
    public enum LogType
    {
        System,Core,Error,Success,Fail,OpenTK,OpenGL,Driver,OS,Script,Render,Graphics,Load,Threaded
    }
    public class Log
    {
        public LogType Type = LogType.System;
        public string Msg = "Nothing.";
        public DateTime Time = DateTime.Now;
        public string Owner = "None.";
        public object Class = null;
    }
}
